Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

244
Vistas
Error: VM769:1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

I tried today for the first time to "connect" a backend (Flask) with a frontend (React). I have a Flask server running on my localhost.

Folder structure looks like this: Ordnerstruktur

So now I have coded a mini Flask server Backend code

Afterwards I wanted to access the built-in JSON in the frontend with "fetch Frontend code

To let React know where the backend is located, I specified the connection in package.json ("proxy": "http://localhost:5000/",) Backend anbindung

according to the tutorial from which i got this code, it should work now. Unfortunately I get the error written above. Error

i tried many things i found in the internet like controling the JSON formatting and so on but everythign seems fine. i also had a problem that when i put after localhost:500/members and in the fetch also "/members" instead of "/" i got a server 500 error back. i could resolve or rather bypass by just simply put "/" in my fetch and backend code.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda